<?php


// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view' );
require (JPATH_COMPONENT . DS . 'config.shop.php');

class ShopViewSettings extends JView
{
	function display($tpl = null)
	{
		JToolBarHelper::title(JText::_( 'Настройки' ), 'generic.png');
		JToolBarHelper::save('saveConfig');
		JToolBarHelper::cancel('cancelConfig');
		
    	
		// Get data from the model
		
		$editor = & JFactory::getEditor();
		
		$this->assignRef('editor',$editor);
	
		$db = & JFactory::getDBO();
                $query = "SELECT id,name FROM #__shop_categories WHERE name!='' ORDER BY ordering ASC";
                $db->setQuery($query);
                $categories = $db->loadObjectList();
                $this->assignRef('cat',$categories);

		parent::display($tpl);
	}
}
?>